package com.example.demo.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;

@Component
public class Notice implements Serializable {
    private static final long serialVersionUID = 397326046912649094L;
    private int id;
    private String notice_title;
    private String notice_content;

   /* 注解名称：@JsonIgnore
    作用：在实体类向前台返回数据时用来忽略不想传递给前台的属性或接口。
    Eg：Bean实体中会有某些运维字段，在返回信息给前台的时候，当不希望将对应值也一并返回；
            　　此时可以在对应属性上加上注解JsonIgnore或者，可以在User类上加上注解@JsonIgnoreProperties(value = "{password}")*/
    @JsonIgnore
    private Date create_time;
    @JsonIgnore
    private Date update_time;
    private int isdelete;

    public int getIsdelete() {
        return isdelete;
    }

    public void setIsdelete(int isdelete) {
        this.isdelete = isdelete;
    }

    public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    public String getNotice_title() {
        return notice_title;
    }
    public void setNotice_title(String notice_title) {
        this.notice_title = notice_title;
    }
    public String getNotice_content() {
        return notice_content;
    }
    public void setNotice_content(String notice_content) {
        this.notice_content = notice_content;
    }

    public Date getCreate_time() {
        return create_time;
    }

    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }

    public Date getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(Date update_time) {
        this.update_time = update_time;
    }

    @Override
    public String toString() {
        return "Notice{" +
                "id=" + id +
                ", notice_title='" + notice_title + '\'' +
                ", notice_content='" + notice_content + '\'' +
                ", create_time=" + create_time +
                ", update_time=" + update_time +
                ", isdelete=" + isdelete +
                '}';
    }
}
